<h4>INFO &raquo; <span class="current_page">TAGIHAN MAHASISWA</span></h4>

            <!-- Begin three column window -->
<div class="onecolumn" style="padding-bottom:20px">
    <div class="header">
    <span>TAGIHAN MAHASISWA - <i>Student Invoice</i></span>
	</div>
	<br class="clear"/>


<div class="content">
<br />
<div align="left" style="padding-left:15px">
   <?php if($biodata != NULL): ?>
     <table cellpadding="0" cellspacing="0" border="0">
     <tbody>
       <tr align="left">
         <td width="100">Nama Lengkap</td>
         <td><b><?php echo ucwords(strtolower($biodata->NAMA)) ?></b></td>
       </tr>
       <tr align="left">
         <td>Program Studi</td>
         <td width="380"><?php echo ucwords(strtolower($biodata->NAMA_PRODI));?> / <?php echo $biodata->KODE_PRODI;?></td>
       </tr>
       <tr align="left">
         <td>NIM</td>
         <td><?php echo $biodata->NIM ?></td>
       </tr>
       </tbody>
      </table>
	  <?php endif; ?>

      <?php if($biodata != NULL): ?>
      <br />
	  <form action="<?php echo base_url().'siab/proses-pembayaran.html'?>" method="post">
	  <table class="data" width="100%" cellpadding="0" cellspacing="0">
		 <tbody>
		 	<tr class="font_white" bgcolor="#000000" align="center">
                <th width="30" height="43">No.</th>
                <th width="97">Jumlah</th>
                <th width="200">Tagihan</th>
                <th width="150">Semester</th>
				<th width="150">Tahun</th>
				<th width="60">Select</th>
            </tr>
			<input name="nim" type="hidden" value="<?php echo $biodata->NIM ?>" />
			<?php $seq_number=1;
            if($tagihan){
            foreach($tagihan as $tagihanValue):?>
            <?php $total_tagihan_per_angsuran = $this->user_model->totalTagihanAngsuran($tagihanValue->NIM,$tagihanValue->KODE_TAGIHAN,$tagihanValue->KODE_TAHUN,$tagihanValue->KODE_SEMESTER) ?>

            <?php $total_potongan_per_angsuran = $this->user_model->totalPotonganAngsuran($tagihanValue->NIM,$tagihanValue->KODE_TAGIHAN,$tagihanValue->KODE_TAHUN,$tagihanValue->KODE_SEMESTER) ?>
            <?php $tagihan_skg = ($total_tagihan_per_angsuran->JUMLAH) - ($total_potongan_per_angsuran->POTONGAN) ?>

            <tr align="center">
			 <td><?php echo $seq_number ?></td>
			 <td><?php echo number_format($tagihan_skg,2,',','.') ?></td>
			 <td><?php echo $tagihanValue->TAGIHAN ?></td>
			 <td><?php echo $tagihanValue->NAMA_SEMESTER ?></td>
			 <td><?php echo $tagihanValue->NAMA_TAHUN ?></td>
			 <td><input name="bayar" type="radio" value="<?php echo $tagihanValue->KODE_TAGIHAN ?>-<?php echo $tagihanValue->KODE_TAHUN ?>-<?php echo $tagihanValue->KODE_SEMESTER ?>-<?php echo $biodata->NIM ?>" <?php if($seq_number==1){?> checked="checked" <?php }?>/></td>
		   </tr>
		   <?php $seq_number++;
           $dis=1;
		   endforeach;
           }?>
           <?php if($kkn):
           $dataTagihanLain=$this->user_model->getNominalTagihan(2);?>
           <tr align="center">
			 <td><?php echo $seq_number ?></td>
			 <td><?php echo number_format($dataTagihanLain->NOMINAL,2,',','.') ?></td>
			 <td><?php echo $dataTagihanLain->NAMA; ?></td>
			 <td>-</td>
			 <td>-</td>
			 <td><input name="bayar" type="radio" value="4-0" <?php if($seq_number==1){?> checked="checked" <?php }?>/></td>
		   </tr>
           <?php $seq_number++;
            $dis=1;
            endif;?>
            <?php if($ppl):
           $dataTagihanLain=$this->user_model->getNominalTagihan(3);?>
           <tr align="center">
			 <td><?php echo $seq_number ?></td>
			 <td><?php echo number_format($dataTagihanLain->NOMINAL,2,',','.') ?></td>
			 <td><?php echo $dataTagihanLain->NAMA; ?></td>
			 <td>-</td>
			 <td>-</td>
			 <td><input name="bayar" type="radio" value="5-0" <?php if($seq_number==1){?> checked="checked" <?php }?>/></td>
		   </tr>
           <?php $seq_number++;
            $dis=1;
            endif;?>
           <?php if($skripsi):
           $dataTagihanLain=$this->user_model->getNominalTagihan(1);?>
           <tr align="center">
			 <td><?php echo $seq_number ?></td>
			 <td><?php echo number_format($dataTagihanLain->NOMINAL,2,',','.') ?></td>
			 <td><?php echo $dataTagihanLain->NAMA; ?></td>
			 <td>-</td>
			 <td>-</td>
			 <td><input name="bayar" type="radio" value="6-0" <?php if($seq_number==1){?> checked="checked" <?php }?>/></td>
		   </tr>
           <?php $seq_number++;
            $dis=1;
            endif;?>
		   <tr align="left">
             <td>&nbsp;</td>
             <td align="left" style="color: #CC0000">No. Referensi :</td>
             <td align="center"><input name="ref" size="40" id="ref" /></td>
             <td colspan="3">&nbsp;</td>
		   </tr>
           <tr align="center">
			 <td colspan="6">
             <input title="Klik untuk validasi" class="button" name="Submit" type="submit" value="Validasi" /> &nbsp;&nbsp;
			 <input type="button" onclick="self.location='<?php echo site_url('siab')?>'" value="Kembali" title="Klik untuk validasi mahasiswa lainnya" class="button"></td>
		   </tr>

		 </tbody>
	 </table>
	 </form>
     <?php else :?>
      <div>
          <div id="p_messages_error" style="width:490px">
           <?php if($biodata == NULL): ?>Maaf, data tidak tersedia.<?php else: ?>Tidak ada tagihan. <?php endif; ?>
          </div>
		  <br /><input type="button" onclick="self.location='<?php echo site_url('siab')?>'" value="Kembali" title="Klik untuk validasi mahasiswa lainnya" class="button">
      </div>
     <?php endif;?>

</div>

<br />
</div>
</div>